﻿@using Chaine.Models
@model List<EmailTemplateModels>
@{
    ViewBag.Title = "Email templates";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section maincontent{
    @if (TempData["update-success"] != null) {
    <div class="alert alert-success">
        Update email template successfully.
    </div>
    }
    <h2>
        @ViewBag.Title</h2>
    <table class="table table-striped table-bordered">
        <thead>
            <tr>
                <td>
                    Email
                </td>
                <td>
                    Title
                </td>
                <td>
                </td>
            </tr>
        </thead>
        <tbody>
            @foreach (var m in Model)
            {
                <tr>
                    <td>@m.Type
                    </td>
                    <td>@m.Title
                    </td>
                    <td>@Html.ActionLink("Edit", "edit", "AdminEmail", new { id = m.Id.ToString() }, null)
                    </td>
                </tr>
            }
        </tbody>
    </table>
}
@section sidebar{
    @Html.Partial("~/views/shared/_adminSidebar.cshtml")
}
